<?php
include_once(PATH_APP_COMMON . "AuthManager.php");
class Controller_AdminUserGroup extends Controller_AdminList  {
	
	protected $_tplForEdit = "UserGroup_Create";
	
	function __construct(){
		parent::__construct();
		$this->assign('option_privilege',$this->model->hashPrivilege);
	}
	
	function actionIndex(){
		$this->assign("tip","如果用户组的用户数量不为零，则该用户组无法删除。");
		parent::actionIndex();
	}
	function actionEdit(){
		$pkv = _gp($this->getPkName(),'int');
		$privilege_selected = M("UserPrivilege")->getPrivilege(0,$pkv);
		$this->assign('privilege_selected',$privilege_selected);
		parent::actionEdit();
	}
}